home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / DEV / A-B / 006.PopMenus.cpt / PopMenus.r < prev    next >
Text File  |  1988-08-01  |  2KB  |  87 lines

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    Apple Macintosh Developer Technical Support
  4. #
  5. #    Pop-up Menu Example Application
  6. #
  7. #    PopMenus
  8. #
  9. #    PopMenus.r    -    ResEdit Source
  10. #
  11. #    Copyright © 1988 Apple Computer, Inc.
  12. #    All rights reserved.
  13. #
  14. #    Versions:    1.0                    8/88
  15. #
  16. #    Components:    PopMenus.p            August 1, 1988
  17. #                PopMenus.r            August 1, 1988
  18. #                PopMenus.make        August 1, 1988
  19. #
  20. #    This program is a simple example of how to use pop-up menus in your
  21. #    application. It implements a pop-up as a userItem in a modal dialog
  22. #    box (this is a helpful example in its own right!).
  23. #
  24. #    See Sample and TESample for the general structure and MultiFinder 
  25. #    techniques that we recommend that you use when building a new application.
  26. #
  27. ------------------------------------------------------------------------------*/
  28. /*
  29.  * Pop-up Menu Example - Resources
  30.  * Bryan Stearns 07Apr87 
  31.  */
  32.  
  33. #include "Types.r"
  34.  
  35. /* Our dialog record */
  36. resource 'DLOG' (128) {
  37.     {30, 30, 330, 490}, dBoxProc, invisible, noGoAway, 0, 128, "Pop-up Test"
  38. };
  39.  
  40. /* Our dialog’s item list */
  41. resource 'DITL' (128) {
  42.     {    
  43.         /* the “OK” button */
  44.         {110, 210, 130, 270}, Button { enabled, "OK" },
  45.         
  46.         /* our pop-up’s userItem */
  47.         {70, 106, 86, 210}, UserItem { enabled },
  48.         
  49.         /* the prompt for our userItem */
  50.         /* (the initial space makes it look better hilighted) */
  51.         {70, 20, 86, 105}, StaticText { disabled, " Pick a font:" },    
  52.  
  53.         /* our button's “default” roundrect userItem (we move it to */
  54.         /* around the OK button at runtime). It's important that it */
  55.         /* be disabled, so that we can tell it from the pop-up! */
  56.         {0, 0, 0, 0}, UserItem { disabled },
  57.         
  58.         /* The program name & date */
  59.         {10, 10, 60, 280}, StaticText { disabled,
  60.             "Pop-up Menu Example\nApple Developer Technical Support\n(BJS 07Apr87)" }
  61.     }
  62. };
  63.  
  64. /* The “I need System 4.1 etc.” alert */
  65. resource 'ALRT' (129) {
  66.     {50, 50, 180, 370}, 129, {
  67.         OK, visible, sound1;
  68.         OK, visible, sound1;
  69.         OK, visible, sound1;
  70.         OK, visible, sound1
  71.     }
  72. };
  73.  
  74. /* The item list for our “I need System 4.1 etc.” alert */
  75. resource 'DITL' (129) {
  76.     {    
  77.         /* the “OK” button */
  78.         {100, 220, 120, 300}, Button { enabled, "Finder" },
  79.         
  80.         /* The message */
  81.         {10, 65, 90, 300}, StaticText { disabled,
  82.             "The Pop-up Menu Example requires a Macintosh II, SE, Plus, or "
  83.             "512Ke personal computer, with system software version 4.1 or newer."
  84.         }
  85.     }
  86. };
  87.